<script setup>
import {  onBeforeUnmount, onMounted } from 'vue';

console.log('1.组件创建前就执行了');

onMounted(()=>{
  console.log('2.1组件挂载完成');
})

onMounted(()=>{
  console.log('2.2组件挂载完成');
})

onBeforeUnmount(()=>{
  console.log('3.组件销毁前执行');
})

</script>

<template>
<h1>生命周期函数</h1>
</template>

<style scoped>
/* 样式 */

</style>
